/*******************************************************************************
 * Copyright (c) 2006 CEA List.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     CEA List - initial API and implementation
 *******************************************************************************/
package com.cea.papyrus.core.figures;

import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.NamedElement;

import com.cea.papyrus.core.helper.ModelerHelper;
import com.cea.papyrus.diagraminterchange2.di2.GraphElement;


// TODO: Auto-generated Javadoc
/**
 * This is the interface that all figures of Papyrus have to implement.
 * 
 * @author Patrick Tessier
 * @since 12 september 2006
 */
public interface IAbstractElementFigure extends IFigure {

	
	/**
	 * in order to obtain the background colord of the figure.
	 * 
	 * @return the background color of the figure
	 */
	public Color getBackgroundColor();

	/**
	 * set the backgound color of the figure.
	 * 
	 * @param backgroundColor the color in the background
	 */
	public void setBackgroundColor(Color backgroundColor);

	/**
	 * in order to set the border color of the figure.
	 * 
	 * @return the border color of the figure
	 */
	public Color getBorderColor();

	/**
	 * set the border coler of the figure.
	 * 
	 * @param borderColor the color of the border of the figure
	 */
	public void setBorderColor(Color borderColor);

	/**
	 * in order to set the icon in the figure
	 * this method is used in the case where the stereotype has got an image (icon).
	 * 
	 * @param img the icon that we want to display
	 */
	public void setIcon(Image img); 

	/**
	 * get the font of the figure.
	 * 
	 * @return return the font of the figure
	 */
	public String getfigureFont();

	/**
	 * set the font of the figure.
	 * 
	 * @param font the font of the figure that we want to see.
	 * For instance, "Arial"
	 */
	public void setfigureFont(String font);
	
	/**
	 * get the font size of the figure.
	 * 
	 * @return int the font size
	 */
	public int getFontSize();

	/**
	 * set the text fontsize of the figure.
	 * 
	 * @param fontSize that we want to see
	 */
	public void setFontSize(int fontSize);
	
	/**
	 * get the foreground color of the figure.
	 * 
	 * @return Color the ForeGround color of the figure
	 */

	public Color getForeGroundColor();


	/**
	 * set the Foreground of the figure.
	 * 
	 * @param foreGroundColor the color that we want ot see
	 */
	public void setForeGroundColor(Color foreGroundColor);

	
	/**
	 * get the line style of the figure.
	 * 
	 * @return this is line style of the figure
	 */

	public String getLineStle();


	/**
	 * set the line style of the figure.
	 * 
	 * @param lineStle the line style
	 */
	public void setLineStle(String lineStle);

	/**
	 * get the lien thiknes of the figure.
	 * 
	 * @return the thickness of the border
	 */
	public int getLineThickness();


	/**
	 * set the line thickness of the figure.
	 * 
	 * @param lineThickness the thickness of the border
	 */
	public void setLineThickness(int lineThickness);
	
	/**
	 * get the font color of the text in the figure.
	 * 
	 * @return the font Color of the text in the figure
	 */
	public Color getFontColor();

	/**
	 * set the fontColor of the text in the figure.
	 * 
	 * @param fontColor of the text in the figure
	 */
	public void setFontColor(Color fontColor);

	/**
	 * Refresh colors of current figure
	 * with colors specified in a GraphElement.
	 * 
	 * @param graphelement te graphElement that contains all information
	 */
	public void refreshColors(GraphElement graphelement);

	/**
	 * Refresh presentation of current figure
	 * with presentation specified in a GraphElement.
	 * 
	 * @param presentation type of Presentation
	 * @param selection the UML Element that selected
	 * 
	 * @see ModelerHelper ModelFactory
	 */
	public void refreshPresentation(String presentation, Element selection, GraphElement ge);	
	
	/**
	 * Refresh list of stereotypes of current EditPart if required
	 * either with or without the first stereotype.
	 * 
	 * @param presentation type of presentation
	 * @param hasIcon the has icon
	 * @param hasShape the has shape
	 * @param stereotypes String thaht contains Stereotype name
	 */
	public void refreshStereotypes(String stereotypes, String presentation, boolean hasIcon, boolean hasShape);	
	
	
	/**
	 * refresh the qulified name if the parent graphElement is diferent of the parent of the associated element.
	 * 
	 * @param element the UML element that is represented by cuurentge
	 * @param currentge the element thaht we want ot see
	 * @param parentge the element that may be rhe parent of the graphe elment
	 */
	public void refreshQualifiedName(GraphElement parentge, GraphElement currentge, NamedElement element);
	
	/**
	 * set the name of the figure.
	 * 
	 * @param name na me of the figure
	 */
	public void setName( String name );

	
	/**
	 * get the label that contains name of the figure.
	 * 
	 * @return label the name Label.
	 */
	public Label getNameLabel();
	
	/**
	 * get the label that contains stereotype name.
	 * 
	 * @return Label that contains all stereotype names
	 */
	public Label getStereotypesLabel();
	
	/**
	 * set the qaulified name of the figure.
	 * 
	 * @param qualifiedName qulified name of the figure
	 */
	public void setQualifiedName( String qualifiedName );
	
	/**
	 * get the label that contains the qualified name.
	 * 
	 * @return Label that contains the qualifed name of the figure
	 */
	public Label getQualifiedNameLabel();
	
	/**
	 * 
	 * @return the minimum witdh of the figure to see all containment
	 */
	public Dimension getMinimumDimension();
	
	/**
	 * In order to obtain the label at a given point.
	 * 
	 * @param pt point
	 * 
	 * @return the condition label at the specified pt
	 */
	public Label getLabelAt(Point pt);

	/**
	 * Set the stereotype value.
	 * If param is null, remove the label.
	 * 
	 * @param stereotypes String that contains list of stereotypes
	 */
	public void setStereotypes( String stereotypes );
}
	
